import { defHttp } from '/@/utils/http/axios';

enum Api {
  List = '/app/version/list',
  Save = '/app/version/save',
  Del = '/app/version',
  SetVersionNew = '/app/version'
}
// list
export const versionList = (params) => defHttp.post({ url: Api.List, params });

// 保存
export const versionSave = (params) => defHttp.post({ url: Api.Save, params });

// 设置版本为最新
export const setVersionNew = (id,isNew) => defHttp.get({ url: Api.SetVersionNew + `/${id}` + `/${isNew}` });

// 删除
export const versionDel = (params: { ids: String }) =>
  defHttp.delete<boolean>({ url: Api.Del + `/${params.ids}` });

